package com.yuanqi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanqi.pojo.SalesReturnOrderAudit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 销售退货订单审核Mapper
 */
@Mapper
public interface SalesReturnOrderAuditMapper extends BaseMapper<SalesReturnOrderAudit> {

    /**
     * 根据退货单ID查询审核记录
     * @param returnOrderId 退货单ID
     * @return 审核记录列表
     */
    List<SalesReturnOrderAudit> selectByReturnOrderId(@Param("returnOrderId") Long returnOrderId);

    /**
     * 获取最新的审核记录
     * @param returnOrderId 退货单ID
     * @return 最新审核记录
     */
    SalesReturnOrderAudit selectLatestByReturnOrderId(@Param("returnOrderId") Long returnOrderId);
}

